package com.example.javabasic.thread.classtwo.threadlocal.demo5;

public class Test {

    public static void main(String[] args) {
        final MessageQueue messageQueue = new MessageQueue();
        //创建生产者
        new ProducerThread(messageQueue,1).start();
        new ProducerThread(messageQueue,2).start();
        new ProducerThread(messageQueue,3).start();
        //创建消费者
        ConsumerThread a = new ConsumerThread(messageQueue, "A");
        ConsumerThread b = new ConsumerThread(messageQueue, "B");
        ConsumerThread c = new ConsumerThread(messageQueue, "C");
        a.start();
        b.start();
        c.start();


    }
}
